#ifndef GT_LINE_H
#define GT_LINE_H

#include "gt_entry.h"

struct range_t {
  size_t begin;
  size_t end;
};

struct line_t {
  int line;
  int opened;
  int is_selectable;
  range_t highlight;
  entry_t entry;
};

entry_t *create_line(result_t *result, char *line, int line_number,
                     range_t match);
entry_t *create_unselectable_line(result_t *result, char *line,
                                  int line_number);

entry_t *create_blank_line(result_t *result);

void display_line(entry_t *entry, search_t *search, int y,
                  int is_cursor_on_entry);

void free_line(entry_t *entry);

int is_line_selectable(entry_t *entry);

#endif // header file protect
       // ok